#!/usr/bin/env bash

git pull
mvn -DskipTests clean package

echo "deploying ytx account server"

kill -9 $(lsof -ti tcp:2009)
cp -rf ytx-account-server/target/ytx-account-server-1.0.0-SNAPSHOT.jar  /home/ytx/deploy/account/
#java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=2007 -jar /home/ytx/deploy/account/ytx-account-server-1.0.0-SNAPSHOT.jar
/home/ytx/deploy/account/ytx-account-server-1.0.0-SNAPSHOT.jar &